--drop table if exists navinfo_stage_0f39;

--创建外部表
create external table if not exists ${hive_db}.navinfo_stage_0f39 (
tid string,
gpstime string,
longitude string,
latitude string,
height string,
direction string,
speed string,
alarm string,
status string,
faultlist string,
originallat string,
originallng string,
mark string,
part_time int
) row format delimited fields terminated by '\001' STORED AS TEXTFILE location '${data_path}/stage_import_0f39';


create table if not exists ${hive_db}.navinfo_parquet_0f39(
tid string,
gpstime string,
longitude string,
latitude string,
height string,
direction string,
speed string,
alarm string,
status string,
faultlist string,
create_time string comment '脚本写入数据到hdfs的时间',
originallat string,
originallng string,
mark int,
part_time int
) partitioned by (part_time int) stored as Parquet TBLPROPERTIES('parquet.compression'='SNAPPY');
